﻿using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace Simple_search.Data
{
    public class ColorPicker
    {
        private static Color[] colors = { 
            Colors.Red,
            Colors.Green,
            Colors.Blue,
            Colors.Brown,
            Colors.BlueViolet,
            Colors.Cyan,
            Colors.DarkOliveGreen,
            Colors.Gold,
            Colors.LightBlue,
            Colors.LightGreen,
            Colors.GreenYellow,
            Colors.Pink,
            Colors.Purple,
            Colors.Yellow,
            Colors.Gray
        };

        public static List<ColorWithBrush> FormColorList()
        {
            List<ColorWithBrush> colorList = new List<ColorWithBrush>();
            foreach(var color in colors)
            {
                colorList.Add(new ColorWithBrush(color));
            }
            return colorList;
        }
    }

    public class ColorWithBrush
    {
        public ColorWithBrush(Color color) {
            Color = color;
            Brush = new SolidColorBrush(Color);
        }
        public Color Color { get; set; }
        public SolidColorBrush Brush { get; set; }
    }
}
